<?php
/**
 * Filename: Mocha.php
 * 调料摩卡，继承与 CondimentDecorator 
 */
include_once 'Condiment.php';

/**
 * 调料 Mocha
 */
class Mocha extends CondimentDecorator {
	/**
	 * 饮料对象
	 *
	 * @var Beverage
	 */
	private $beverage;
	
	/**
	 * 构造函数，获得饮料对象
	 */
	public function __construct(Beverage $beverage) {
		$this->beverage = $beverage;
	} //END func __construct
	
	/**
	 * @see CondimentDecorator::getDescription()
	 *
	 * @return string
	 */
	public function getDescription() {
		return $this->beverage->getDescription().', Mocha';
	} //END func getDescription

	/**
	 * @see Beverage::cost()
	 *
	 */
	public function cost() {
		return 0.20 + $this->beverage->cost();
	} //END func cost
	
} //END class Mocha
?>